len() == 0 => is_empty()
authorAlex Crichton <alex@alexcrichton.com>
Mon, 23 Mar 2015 23:22:04 +0000 (16:22 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 23 Mar 2015 23:22:04 +0000 (16:22 -0700)
src/bin/bench.rs
src/bin/cargo.rs
src/bin/run.rs
src/bin/test.rs

index bdbcc96a871cd951fea9db8ed7fbda8beea1d665..735b2e0d4e6a826924ed15dc62371ed7b38259a5 100644 (file)
@@ -67,7 +67,7 @@ pub fn execute(options: Options, config: &Config) -> CliResult<Option<()>> {
             exec_engine: None,
             release: true,
             mode: ops::CompileMode::Bench,
-            filter: if benches.len() == 0 {
+            filter: if benches.is_empty() {
                 ops::CompileFilter::Everything
             } else {
                 ops::CompileFilter::Only {
index 0ad3a53c2d86e58a06434411c04605e14b36ed0b..7c04323cdfe172fc6ca65d6b7195e0b5988f8d95 100644 (file)
@@ -105,7 +105,7 @@ fn execute(flags: Flags, config: &Config) -> CliResult<Option<()>> {
         // For the commands `cargo` and `cargo help`, re-execute ourselves as
         // `cargo -h` so we can go through the normal process of printing the
         // help message.
-        "" | "help" if flags.arg_args.len() == 0 => {
+        "" | "help" if flags.arg_args.is_empty() => {
             config.shell().set_verbose(true);
             let args = &["cargo".to_string(), "-h".to_string()];
             let r = cargo::call_main_without_stdin(execute, config, USAGE, args,
index 8093d5b6534f20f12aaf3bc9175264f4f0c0c0dd..9ff8728fa3ab512107ec84ee7fa1fe960dc8d7a5 100644 (file)
@@ -64,7 +64,7 @@ pub fn execute(options: Options, config: &Config) -> CliResult<Option<()>> {
         exec_engine: None,
         release: options.flag_release,
         mode: ops::CompileMode::Build,
-        filter: if examples.len() == 0 && bins.len() == 0 {
+        filter: if examples.is_empty() && bins.is_empty() {
             ops::CompileFilter::Everything
         } else {
             ops::CompileFilter::Only {
index b6f9a12e99750c003a537dbe958a0ac71cf11344..1b09e6d2ce0d644845b9957d9882493dbe06d265 100644 (file)
@@ -74,7 +74,7 @@ pub fn execute(options: Options, config: &Config) -> CliResult<Option<()>> {
             exec_engine: None,
             release: false,
             mode: ops::CompileMode::Test,
-            filter: if tests.len() == 0 && bins.len() == 0 {
+            filter: if tests.is_empty() && bins.is_empty() {
                 ops::CompileFilter::Everything
             } else {
                 ops::CompileFilter::Only {